<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends Action {
	public function index() {
		echo "hello";
	}
	
	/**
	 * @since 2013/01/10
	 * @author
	 * Enter description here ...
	 */
	public function doLogin() {
		
		$userName = $_POST ['username'];
		$passWord = $_POST ['password'];
		
		$model = M ( 'inspector' );
		$where ['name'] = $userName;
		$where ['password'] = $passWord;
		
		$result = $model->where ( $where )->select ();
		
		if ($result) {
			echo ("success");
		} else {
			echo ("error");
		}
	}
}